-
Notifications
You must be signed in to change notification settings - Fork 167
fix Feature: inheritance checks for typed dictionaries #1346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Running test.py should generate some changes, could you please include them in the commit? |
| "typeddicts_readonly_consistency.py": [], | ||
| "typeddicts_readonly_inheritance.py": [ | ||
| "Line 98: Expected 1 errors", | ||
| "Line 106: Expected 1 errors", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, I don't think this fully fixes #52, we also have to apply these rules in multiple inheritance.
The code pointer for that is
pyrefly/pyrefly/lib/alt/class/class_field.rs
Line 2007 in 41db847
| pub fn check_consistent_multiple_inheritance(&self, cls: &Class, errors: &ErrorCollector) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
back to you with a few comments
|
@yangdanny97 has imported this pull request. If you are a Meta employee, you can view this in D85366496. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly looks good to me - could we add a unit test (or a couple of them if you think that's better) covering the changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it looks good to me - hopefully we can land by end of day Monday!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review automatically exported from Phabricator review in Meta.
| | Type::Overload(_) | ||
| ) | ||
| }) { | ||
| // TODO(fangyizhou): Handle bound methods and functions properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think this should be removed --- I still plan to come back to this
part of #52